<!DOCTYPE html>
<html>
<head>
	<title>登录</title>
	<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="format-detection" content="telephone=no">
	<style>
	.content{
		width: 100%;
		margin-top: 40%;
		text-align: center;
	}
	.longin-boder{
		width: 80%;
		height: 40px;
		margin-top: 10px;
		margin-left: 10%;
		line-height: 40px;
		text-align: center;
		border: 1px solid #dddddd;
		border-radius: 5px;  
		background-color: #efefef;
	}
	.image{
		width: 20%;
		margin-top: 5px;
		float: left;
		text-align: center;
	}
	.input{
		width: 90%;
		float: left;
		margin-left: 5%;
		height: 37px;
		line-height: 37px;
		border:0px;
		color: #333333;
		font-size: 16px;
		text-align: center;
		background-color: #efefef;
		
	}
	 
	.button{
		height: 40px;
		width: 50%;
		margin-top: 20px;
		margin-left: 25%;
		font-size: 16px;
		font-family: "微软雅黑";
		font-weight: bold;
		line-height: 38px;
		border-radius: 5px;
		color: #ffffff;
		background-color: #37B4CA;
		
	}
	 
	.button:active {  
		background-color:#37a3b9;
	}
	 
	</style>
</head>
<body>
<div class="content">
	<div class="longin-boder">
		
		<input class="input" id="name" type="text" placeholder="输入姓名" />
	</div> 
	<!--End用户名输入框-->
	<div class="longin-boder">
		
		<input class="input" id="stuNo" type="text" placeholder="输入学号"/>
	</div>
	<!--End密码输入框-->
	<br/>
	<br/>
	<div >
		<div class="button" id="in" onclick="inCCUni()">进校</div>
		<div class="button" id="out" onclick="outCCuni()">出校</div>
	</div>
</div>
</body>
<script language="JavaScript">
	
	//检查学号姓名是否空
	function check(){
		var name =  document.getElementById("name").value;
		var stuNo =  document.getElementById("stuNo").value;
		if(name == "" || stuNo == ""){
			alert("姓名学号不能为空！")
			return "false"
		}
		
		return "name="+ name +"&stuNo="+stuNo;
		 
	}
	
	function inCCUni(){
		var str = check();
		if(str == "false"){
			return;
		}
		var url ="进校.html?"+str;
		location.href=url;
		
	}
	
	function outCCuni(){
		var str = check();
		if(str == "false"){
			return;
		}
		var url ="出校.html?"+str;
		location.href=url;
		
	}
	
	

</script>
</html>